﻿function ExchangeRate()
{
	var strHTML='';
	for (var i = 0; i <= 12; i++) {
	    if (vForexs[i] != null && vCosts[i] != null) {
	        if (vForexs[i] != '' && vCosts[i] != '' && vCosts[i] != '-' && vForexs[i] != null && vCosts[i] != null) {
	            strHTML += "<table border='0' cellpadding='4' cellspacing='0' style='border-collapse: collapse' align='center'>";
	            strHTML += "<tr>";
	            strHTML += "<td style='width: 104px; text-align:center;'>";
	            strHTML += vForexs[i];
	            strHTML += "</td>";
	            strHTML += "<td style='width: 104px; text-align:center;'>";
	            strHTML += vCosts[i] + " VND";
	            strHTML += "</td>";
	            strHTML += "</tr>";
	            strHTML += "</table>";
	            document.getElementById('divEchangeRate').innerHTML = strHTML;
	        }
	    }
	}
}

function GoldPrice()
{
	var strHTML='';
	strHTML += "<table border='0' cellpadding='4' cellspacing='0' style='border-collapse: collapse; border-color: Gray' align='center'>";
	strHTML+="<tr>";
	strHTML += "<td style='width: 100px; text-align:center;'>"
    strHTML+="Loại vàng";
    strHTML+="</td>";
    strHTML += "<td style='width: 100px; text-align:center;'>";
    strHTML+="Mua";
    strHTML+="</td>";
    strHTML += "<td style='width: 100px; text-align:center;'>";
    strHTML+="Bán";
    strHTML+="</td>";
    strHTML += "</tr>";

    // SBJ
    if (isNaN(vGoldSbjBuy.replace(',', '').replace('.', '')) == false) {
        strHTML += "<tr>";
        strHTML += "<td style='width: 100px; text-align:center;'>";
        strHTML += "SBJ";
        strHTML += "</td>";
        strHTML += "<td style='width: 100px; text-align:center;'>";
        strHTML += vGoldSbjBuy;
        strHTML += "</td>";
        strHTML += "<td style='width: 100px; text-align:center;'>";
        strHTML += vGoldSbjSell;
        strHTML += "</td>";
        strHTML += "</tr>";
    }

    // SJC
    if (isNaN(vGoldSjcBuy.replace(',', '').replace('.', '')) == false) {
        strHTML += "<tr>";
        strHTML += "<td style='width: 100px; text-align:center;'>";
        strHTML += "SJC";
        strHTML += "</td>";
        strHTML += "<td style='width: 100px; text-align:center;'>";
        strHTML += vGoldSjcBuy;
        strHTML += "</td>";
        strHTML += "<td style='width: 100px; text-align:center;'>";
        strHTML += vGoldSjcSell;
        strHTML += "</td>";
        strHTML += "</tr>";
    }

    strHTML += "</table>";
    //alert(strHTML);
	document.getElementById('divGoldPrice').innerHTML = strHTML;
}


function showWeather_Lucnv(value)
{
	if (value==1)
	{
		document.getElementById("lblInfo").innerHTML=document.getElementById("lblSonLa").value;
	}
	if (value==2)
	{
	    document.getElementById("lblInfo").innerHTML = document.getElementById("lblHaiPhong").value;
	}
	if (value==3)
	{
	    document.getElementById("lblInfo").innerHTML = document.getElementById("lblHaNoi").value;
	}
	if (value==4)
	{
	    document.getElementById("lblInfo").innerHTML = document.getElementById("lblVinh").value;
	}
	if (value==5)
	{
	    document.getElementById("lblInfo").innerHTML = document.getElementById("lbldaNang").value;
	}
	if (value==6)
	{
	    document.getElementById("lblInfo").innerHTML = document.getElementById("lblNhaTrang").value;
	}
	if (value==7)
	{
	    document.getElementById("lblInfo").innerHTML = document.getElementById("lblPleiku").value;
	}
	if (value==8)
	{
	    document.getElementById("lblInfo").innerHTML = document.getElementById("lblTPHCM").value;
	}
}
